<?php

/**
 * CourseSemester form base class.
 *
 * @package    FinalsClub
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 12815 2008-11-09 10:43:58Z fabien $
 */
class BaseCourseSemesterForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'course_id'   => new sfWidgetFormPropelChoice(array('model' => 'Course', 'add_empty' => false)),
      'semester_id' => new sfWidgetFormPropelChoice(array('model' => 'Semester', 'add_empty' => false)),
      'active'      => new sfWidgetFormInputCheckbox(),
      'updated_at'  => new sfWidgetFormDateTime(),
      'created_at'  => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'CourseSemester', 'column' => 'id', 'required' => false)),
      'course_id'   => new sfValidatorPropelChoice(array('model' => 'Course', 'column' => 'id')),
      'semester_id' => new sfValidatorPropelChoice(array('model' => 'Semester', 'column' => 'id')),
      'active'      => new sfValidatorBoolean(array('required' => false)),
      'updated_at'  => new sfValidatorDateTime(array('required' => false)),
      'created_at'  => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('course_semester[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'CourseSemester';
  }


}
